package router

import (
	"github.com/gin-gonic/gin"
	"kim/controller"
)

func ApiRoutersInit(r *gin.Engine) {
	apiRouters := r.Group("/api")
	apiRouters.GET("/test", func(c *gin.Context) {
		c.JSON(200, gin.H{
			"message": 200,
		})
	})

	apiRouters.POST("/login", controller.ApiController{}.Login)
	apiRouters.POST("/register", controller.ApiController{}.Register)
	apiRouters.POST("/addUserToGroup", controller.ApiController{}.AddUserToGroup)
	apiRouters.DELETE("/deleteUserFromGroup", controller.ApiController{}.DeleteUserFromGroup)
	apiRouters.GET("/getGroupsByUserId", controller.ApiController{}.GetGroupsByUserId)

}

func ChatRoutersInit(r *gin.Engine) {
	r.GET("/chat", controller.ChatController{}.UpGradeHandler)
}
